package com.rocky.project.model.family;

import com.rocky.project.model.base.BaseEntity;

/**
 * 
 * @hibernate.class table="t_attachment" dynamic-insert="true"  dynamic-update="true"
 * 
 */
public class Attachment extends BaseEntity {
	private Family family;//所属会员
	private Archive archive;//所属档案
	private static final long serialVersionUID = -8606307825287234689L;
	private String name;// 附件标题
	private String relativePath;// 相对路径
	private String displayName;// 显示文件名
	private Integer downloadTimes = 0;// 下载次数
	private String version = "0.0";// 版本
	private Long size;// 大小
	private String type;// 	 1:photos;//照片  2:pics;//图纸 	 3:archivePics;//历史档案	 4:files;//备注文档
	

	
	/**
	 * @hibernate.many-to-one 
	 * column = "c_archive_id" 
	 * cascade="none"	 
	 * not-null = "false"
	 */

	public Archive getArchive() {
		return archive;
	}

	public void setArchive(Archive archive) {
		this.archive = archive;
	}

	/**
	 * @hibernate.property column = "c_name" type = "string" not-null="false"
	 */
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @hibernate.property column = "c_relativepath" type = "string" not-null="false"
	 */
	public String getRelativePath() {
		return relativePath;
	}

	public void setRelativePath(String relativePath) {
		this.relativePath = relativePath;
	}

	/**
	 * @hibernate.property column = "c_downloadtimes" type = "int"
	 *                     not-null="false"
	 */
	public Integer getDownloadTimes() {
		return downloadTimes;
	}

	public void setDownloadTimes(Integer downloadTimes) {
		this.downloadTimes = downloadTimes;
	}


	/**
	 * @hibernate.property column = "c_version" type = "string" not-null="false"
	 */
	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;		
	}

	/**
	 * @hibernate.property column = "c_displayname" type = "string"  not-null="false"
	 */
	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	/**
	 * @hibernate.property column = "c_size" type = "long" not-null="false"
	 */
	public Long getSize() {
		return size;
	}

	public void setSize(Long size) {
		this.size = size;
	}
	/**
	 * @hibernate.many-to-one 
	 * column = "c_family_id" 
	 * cascade="none"	 
	 * not-null = "true"
	 */
	public Family getFamily() {
		return family;
	}

	public void setFamily(Family family) {
		this.family = family;
	}
	/**
	 * @hibernate.property column = "c_type" type = "string" not-null="false"
	 */
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
